home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 4.1 KB | 143 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWPartng.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWPARTNG_H
- #define FWPARTNG_H
-
- #ifndef FWPART_H
- #include "FWPart.h"
- #endif
-
- #ifndef FWPROXY_H
- #include "FWProxy.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_MProxy;
- class FW_CCloneInfo;
- class FW_CProxyFrame;
- class FW_CPartProxyFrameIterator;
- class FW_CSelection;
-
- //========================================================================================
- // class FW_CEmbeddingPart
- //========================================================================================
-
- class FW_CEmbeddingPart : public FW_CPart
- {
- friend class FW_CPartProxyIterator;
-
- public:
- FW_DECLARE_CLASS
-
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- FW_CEmbeddingPart(ODPart* odPart,
- FW_Instance partInstance,
- FW_ResourceID partInfoID);
-
- virtual ~FW_CEmbeddingPart();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- // ----- Release -----
- virtual void ReleaseAll(Environment *ev);
-
- // ----- Linking -----
- virtual void LinkStatusChanged(Environment *ev, ODFrame* odFrame);
-
- // ----- Purge -----
- virtual ODSize Purge(Environment *ev, ODSize size);
-
- // ----- Part Properties -----
- virtual ODStorageUnit* AcquireContainingPartProperties(Environment* ev,
- ODFrame* embeddedFrame);
-
- // ----- Cloning -----
- virtual void CloneInto(Environment *ev,
- ODDraftKey key,
- ODStorageUnit* toSU,
- ODFrame* scope);
-
- // ----- Factory -----
- virtual FW_CDataInterchange* NewDataInterchange(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- virtual void EmbeddedFrameRemoved(Environment *ev,
- FW_MProxy* proxy);
-
- FW_MProxy* GetProxy(Environment *ev, ODFrame* embeddedFrame) const;
-
- //----------------------------------------------------------------------------------------
- // Internal API (you should never have to called it)
- //
- public:
- // ----- Frame Group/Sequence Number -----
- ODID PrivGetNextFrameGroup(Environment *ev);
- void PrivSetNextFrameGroup(Environment *ev, ODID frameGroup);
-
- // ----- ProxyFrame list management -----
- void PrivAddProxy(Environment* ev, FW_MProxy* proxy);
- void PrivRemoveProxy(Environment* ev, FW_MProxy* proxy);
-
-
- #ifdef FW_BUILD_WIN
- void WinAddEmbedMenu(Environment *ev,
- FW_CMenuBar *menuBar);
- ODPart* WinCreateEmbeddedPartFromCommand(Environment* ev,
- ODCommandID commandID);
-
- void WinEnableEmbedMenu(Environment* ev,
- FW_CMenuBar* menuBar);
- #endif
-
- //----------------------------------------------------------------------------------------
- // Data members
- //
- private:
- FW_TOrderedCollection<FW_MProxy>* fProxys;
- ODID fNextFrameGroup;
-
- #ifdef FW_BUILD_WIN
- // This is used by the Windows version to create the embed menu
- FW_CPullDownMenu* fWinEmbedMenu;
- ODCommandID fWinFirstPartID;
- ODCommandID fWinLastPartID;
- char fTypeString[1024]; // [HLX] need to be dynamic
- char *fTypePtr [25]; // [HLX] need to be dynamic
- #endif
- };
-
- //========================================================================================
- // Inlines
- //========================================================================================
-
- //---------------------------------------------------------------------------------------
- // FW_CEmbeddingPart::PrivGetNextFrameGroup
- //----------------------------------------------------------------------------------------
- inline ODID FW_CEmbeddingPart::PrivGetNextFrameGroup(Environment*)
- {
- return ++fNextFrameGroup;
- }
-
- #endif
-
-
-
-